prune and trim